package cn.dlc.com.order.feign;

import cn.dlc.com.order.entity.Product;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author 邓立川
 * @date 2021/1/3 12:31
 * @desc 通过feign来指定对应的降级方法，方式1，测试方式2的时候注释掉@Component
 */
//@Component
@Slf4j
public class ProductServiceFallback implements ProductService{

    public Product findById(String id) {
        Product product = new Product();
        product.setDesc("feign fallback....." + id);
        return product;
    }
}
